<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    /* 
        箭头函数只有一个参数是，可以省略（）
    */
    const fn = (a) => {
      console.log(a, "a");
    };
    fn(2);
    // a,b会在没有传递实参时，默认值生效
    const fn1 = (a = 10, b = 20) => {
      console.log(a, b);
    };
    fn1();
  </script>
</html>
